﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;

namespace WXYW
{
    public partial class Top : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            userNameLbl.Text = ContextService.CurrentAccount.UserName;
        }

        protected void LinkButton1_Click(object sender, EventArgs e)
        {            
            ContextService.ClearAccount();
            FormsAuthentication.SignOut();
        }

        public string GetRoleName(int roleTypeID)
        {
            
            string roleName = "";
            switch (roleTypeID)
            {
                case 1:
                    roleName = "管理员";
                    break;
                case 10:
                    roleName = "客户";
                    break;
                case 3:
                    roleName = "派单员";
                    break;
                case 4:
                    roleName = "维修工程师";
                    break;
                case 5:
                    roleName = "财会";
                    break;
            }
            return roleName;
        }
    }
}
